<?PHP
if(!isset($swDatabaesConnetion)){
	$swDatabaesConnetion=1;

	class  MySqlDriver{
		var  $_db_user="root";
		var $_db_host="localhost";
		var $_db_password="";
		var $_db_databank="tunisiamarchecomdb3";
		public function  MySqlDriver(){
		}
		public static function GetDB(){
			$_db_user="root";
			$_db_host="localhost";
			$_db_password="";
			$_db_databank="tunisiamarchecomdb3";
			$_datalink=mysql_connect($_db_host,$_db_user,$_db_password);
			if(!$_datalink){
				die("Keine Verbindung zur Datenbank m�glich: " .
						mysql_error());
			}
			$_DB=mysql_select_db($_db_databank,$_datalink);
			if(!$_DB){
				echo "Konnte die Datenbank nicht ausw�hlen.";
			}
			return $_DB;
		}
		public static function GetLink(){
			$_db_user="root";
			$_db_host="localhost";
			$_db_password="";
			$_db_databank="tunisiamarchecomdb3";
			$_datalink=mysql_connect($_db_host,$_db_user,$_db_password);
			if(!$_datalink){
				die("Keine Verbindung zur Datenbank m�glich: " .
						mysql_error());
			}
			$_DB=mysql_select_db($_db_databank,$_datalink);
			if(!$_DB){
				echo "Konnte die Datenbank nicht ausw�hlen.";
			}
			return $_datalink;
		}
	 public static function GetPDO(){
	 	$_db_user="root";
	 	$_db_host="localhost";
	 	$_db_password="";
	 	$_db_databank="tunisiamarchecomdb3";
	 	$db= new PDO("mysql:host=$_db_host;dbname=$_db_databank", $_db_user, $_db_password);
	 	return $db;
	 }
	}
	$_db_link= MySqlDriver::GetLink();
	$_DB=MySqlDriver::GetPDO();
}
?>
